package com.training.serialization;

import java.io.FileInputStream;
import java.io.ObjectInputStream;

public class DeSerializationTest {

	public static void main(String[] args) {
		String filename = "C:\\Anjali\\work\\teacher.ser";

		FileInputStream fis = null;
		ObjectInputStream in = null;
		try {
			fis = new FileInputStream(filename);
			in = new ObjectInputStream(fis);
			Teacher teacher = (Teacher) in.readObject();
			System.out.println(teacher.getName());
			in.close();
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
}